-- GENERATED SPELL FOR [Kagani Nightstrike] --


function spell0_24557(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(15582,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24557', 584, 1)
end

function spell1_24557(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(15657,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24557', 669, 1)
end

function spell2_24557(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_24557', 591, 1)
end

function spell3_24557(pUnit, Event) --@Eviscerate,n/a--
pUnit:FullCastSpellOnTarget(27611,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24557', 540, 1)
end

function spell4_24557(pUnit, Event) --@Eviscerate,n/a--
pUnit:FullCastSpellOnTarget(46189,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24557', 640, 1)
end

function spell5_24557(pUnit, Event) --@Gouge,n/a--
pUnit:FullCastSpellOnTarget(12540,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24557', 4347, 1)
end

function spell6_24557(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(27613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24557', 4330, 1)
end

function spell7_24557(pUnit, Event) --@Kidney Shot,n/a--
pUnit:FullCastSpellOnTarget(27615,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24557', 4000, 1)
end

function spell8_24557(pUnit, Event) --@Medallion of Immunity,Self--
pUnit:FullCastSpellOnTarget(46227,pUnit)
pUnit:RegisterEvent('Sorts_24557', 299, 1)
end

function spell9_24557(pUnit, Event) --@Vanish,Self--
pUnit:FullCastSpellOnTarget(44290,pUnit)
pUnit:RegisterEvent('Sorts_24557', 588, 1)
end

function Sorts_24557(pUnit, Event)
local choix_sorts_24557 = math.random(0, 9)
if choix_sorts_24557 == 0 then
pUnit:RegisterEvent('spell0_24557', 1, 1)
end
if choix_sorts_24557 == 1 then
pUnit:RegisterEvent('spell1_24557', 1, 1)
end
if choix_sorts_24557 == 2 then
pUnit:RegisterEvent('spell2_24557', 1, 1)
end
if choix_sorts_24557 == 3 then
pUnit:RegisterEvent('spell3_24557', 1, 1)
end
if choix_sorts_24557 == 4 then
pUnit:RegisterEvent('spell4_24557', 1, 1)
end
if choix_sorts_24557 == 5 then
pUnit:RegisterEvent('spell5_24557', 1, 1)
end
if choix_sorts_24557 == 6 then
pUnit:RegisterEvent('spell6_24557', 1, 1)
end
if choix_sorts_24557 == 7 then
pUnit:RegisterEvent('spell7_24557', 1, 1)
end
if choix_sorts_24557 == 8 then
pUnit:RegisterEvent('spell8_24557', 1, 1)
end
if choix_sorts_24557 == 9 then
pUnit:RegisterEvent('spell9_24557', 1, 1)
end
end

function mob24557_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24557', math.random(1500, 3000), 1)
end

function mob24557_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24557_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24557_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24557, 1, 'mob24557_Action')
RegisterUnitEvent(24557, 2, 'mob24557_Leave')
RegisterUnitEvent(24557, 3, 'mob24557_Kill')
RegisterUnitEvent(24557, 4, 'mob24557_Die')
